import React, { Component } from 'react'
import Child from './Child'

export default class App extends Component {
  state = {
    salary: 11.46,
    obj2: {
      name: 'elser',
      age: '19',
    },
  }
  render() {
    return (
      <div>
        App
        <hr />
        {/* #1 父组件通过自定义属性进行传递 */}
        <Child
          salary={this.state.salary}
          age='18'
          num={888}
          oBar='true'
          bBar={true}
          obj1={{ name: 'ifer', age: 18 }}
          obj2={this.state.obj2}
          fn={() => 'Hello World'}
          jsx={<p>Hello World</p>}
        />
      </div>
    )
  }
}
